#pragma once

#include "Constants.h"
#include "WindowsX.h"

namespace Vortex { namespace Wrapper { namespace Platform {

	public ref struct WinApi abstract sealed {

		///<summary>Retrieves window client rectangle</summary>
		static System::Drawing::Rectangle GetWindowClientRect(IntPtr windowHandle);

		///<summary>Converts client point into screen coordinate space</summary>
		static System::Drawing::Point ClientToScreen(IntPtr windowHandle, System::Drawing::Point localPoint);

		///<summary>Test where current cursor point hits given window</summary>
		static HitTestResult TestWindowPoint(IntPtr hWnd);


		static int GetXParam(int value) {
			return GET_X_LPARAM(value);
		}

		static int GetYParam(int value) {
			return GET_Y_LPARAM(value);
		}

		static unsigned short GetKeyStateParam(int value) {
			return GET_KEYSTATE_WPARAM(value);
		}

		static short GetWheelDeltaParam(int value) {
			return GET_WHEEL_DELTA_WPARAM(value);
		}

		///<summary>MS-defined wheel delta divisor</summary>
		static const int WHEEL_DELTA_BASE = WHEEL_DELTA;
	};

} } }